package global

import (
	"github.com/go-redis/redis/v8"
	"github.com/go-redsync/redsync/v4"
	"gorm.io/gorm"
	"sale_system/inventory_srv/config"
)

var (
	ServerConfig *config.ServerConfig = &config.ServerConfig{}
	DB           *gorm.DB
	NacosConfig  *config.NacosConfig = &config.NacosConfig{}
	RedsSync     *redsync.Redsync
	RedisClient  *redis.Client
)

//// 当前包被调用时自动执行init函数
//func init() {
//
//	dsn := "root:123456@tcp(192.168.56.101:3306)/sale_user_srv?charset=utf8mb4&parseTime=True&loc=Local"
//	DB, _ = gorm.Open(mysql.Open(dsn), &gorm.Config{})
//
//}
